Every Web server has a root, the top-most directory that can be accessed
by the web server. It is important to set this root in your preferences,
so that the addressing functions will generate the correct URLs for you.
Now, how you determine where your root is depends very much on where
your Web server is, what platform it runs on, and how it is set up.
I work with two Web servers, one running MacHTTP on an old Mac
IIsi, and the other being CERN httpd running on a Unix machine.
Before I go any further, it is important to stress that it is A BAD THING
to edit 'live' documents. This can cause untold problems to anyone
actually accessing your server at the time, so try to avoid it if you
can.
My approach is to have a mirror of the Web area on my local hard disk.
This allows me to do all the editing and testing offline. I can then copy
the whole structure over to the Mac (and the Unix machine) in one
operation (I would put in a hearty recommendation for the Synchronize
application for this job - it is certainly invaluable to my work). The
othe advantage is that you have a backup of your Web.
Focusing on the Unix system for a moment, there are a few things that
you need to bear in mind. Firstly is that the case of you text is
significant, so if you have made links to local files, then make sure
that the case of the path and file name is exactly as it is on the
server, otherwise you will be wondering why you keep getting errors.
Secondly, if you intend to run any scripts over you web on the Unix
machine, remember that unless you explicitly save your html documents
in a unix format, then all lines will end with the standard Mac
carriage return only, rather than CR/LF pairs.
OK, now the way that the system is set up here in York is that I can
mount my account on the Unix machine on my Mac as though it was another
Mac volume. I can't access any areas higher up the Unix directory in
this way. This means that there is a 'gap' between the unix web server
root and the files in my account. This gap is usually plugged on a Unix
machine by the '~userID' shortcut, which takes you directly to the
account of the userID specified (the tilde means go to the home
directory of the userID). In my case that is '~ld11'. So in order to
generate valid URLs, I need to be able to specify the URL to the root
of the web server (eg http://www.york.ac.uk/), and in addition, the
prefix that I need in order to get any of the files in my local area to
be accessed.
So in my settings, I would set the server URL to be
'http://www.york.ac.uk', and the server prefix would be '~ld11'.
For those of you who don't have to jump through these sorts of hoops, you
don't need to fill anything into the server prefix field.
Now all you have to do is set the root on you local machine to the
top folder of the mirror that you have created and you have set it all
up!
On a related note, I would suggest strongly that you take advantage of the BASE directive for your Web pages. The BASE HREF is used by the tools in some circumstances, and is always useful for people browsing your pages. Enter the HREF for your document in the BASE field of the Document tool.